home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / fish / 751-760 / 757 / pc / pc.readme < prev    next >
Text File  |  1995-03-18  |  6KB  |  128 lines

  1.  
  2. Program name:  Printer Controller
  3.  
  4. Written with:  Profimat (AssemPro) assembler
  5.  
  6. Machine:       Standard Amiga 500 with OS1.3, One floppy drive,1 MByte RAM
  7.  
  8. Author:        Kamran Karimi
  9.  
  10. Source:        Included
  11.  
  12. Run methode:   From both WorkBench and Shell (As all Amiga Programs should)
  13.  
  14. What it does:  Sends scape codes to printer  
  15.  
  16. By the way:    
  17.  
  18. Program status:This program is semi-shareware meaning that I would like to 
  19. receive money, books or software if you use this program, but it is not
  20. obligatory for poor Amiga users (I am one of them!).
  21. I retain the CopyWrite to to the program including the source and the
  22. executable form of it.
  23.  
  24. Directory contents:
  25.  PC
  26.  PC.s
  27.  PC.ReadMe
  28.  
  29.  
  30.  
  31.   This program was written as a way to use the printer more easily with the 
  32.  Amiga.The program sends ESCAPE codes to the printer according to the ANSI
  33.  standard so it should be useable on many printers.It is very small (less
  34.  than 10 KBs) but does useful work.It was written in Assembly and should 
  35.  compile  on most assemblers.Codes sent to the printer are all 6 characters,
  36.  the first of them is mostly ESC (27 decimal) followed by other chars.Some
  37.  codes are shorter than others for example Linefeed (10 decimal).To keep
  38.  the generality of the program algorithm I have filled the following chars
  39.  with NULLs (0 decimal) after the code to Turn an option ON I have written 
  40.  the OFF code in the following 6 chars.in the codes with no OFF option (like
  41.  Formfeed) the first sequence has been repeated.the words COLUMNx_FLAGS 
  42.  (x=1,3) has the condition of the menu items,for example bit 0 of the
  43.  COLUMN1_FLAGS,if set shows the Italics option has not been checked so we
  44.  must send the ON code,then we change the state of the bit so as the second 
  45.  time by testing it we know that OFF code should be sent to it (I consider
  46.  this method easier than using the system information Maybe you'd like to
  47.  try the CHECKED bit in the menu structue.Do not choose multiple menus
  48.  while holding down the right mouse button.The program will send only the
  49.  first one and chekmark the others wrong.Choose options one by one.
  50.  
  51.   The method to find the address of the code sequence to be sent is simple:
  52. first we get the base address of the codes (Styles,Character sets,Control)
  53. then after multiplying the item number by 12 or 6 (there are 12 or 6 characters
  54. for each code sequence) we have the starting address of the code.
  55.  
  56.   The 'Start Column' and 'End Column' show the position of the input text
  57. in the string gadget.Note that the numbers start from 0 not 1.It is 
  58. automatically updated by the UpDate routine which gets the number from the
  59. 'Number' address in the STR_INFO structure of the gadget this is Updated
  60. by the system.Start column is found by finding the first non_blank character
  61. the routine B2A converts Binary numbers to ASCII and saves them in a string
  62. after adding a NULL.
  63.  
  64.  To print a line:first choose the desired Styles , character set and other
  65. settings then choose 'a line' from the 'Print' menu column and Enter text
  66. then click on the OK gadget. note that you are not allowed to choose a menu
  67. item when you've selected the items of the 'print'menu column.you must click
  68. on the NO gadget to cancel the print process then choose from menus.To print
  69. a file choose 'a File' and enter the file name along with the complete path
  70. for example 'df0:s/Script'.Do not enter spaces at the begining.Click the NO
  71. gadget to quit the process.
  72.  
  73.    The last menu column 'Stand By' allows you to temporerily quit the
  74. program.it will close the window and open another one with the name 'PC'
  75. then the task is put to wait with a call to WaitPort routine.In this way 
  76. no CPU time is waisted (you can confirm that with the PM program in the extra
  77. disk).To reactivate the Printer Controller just click on the gadget inside it.
  78.  
  79.  some words like flag or UnderFlag are used to determine what menu checkmarks
  80. must be checked.For example you may choose the Italics option or a character
  81. set but the printer could not be opened to send the code so the related check
  82. mark should be restored to the initial state.
  83.   
  84.  After every illegal menu choose the program cleans up the selected item.
  85.  
  86.  the PC is rather small in size and uses little processor power.these 
  87. characteristics allows it to be a handy tool to always be around (possibly
  88. by placing it in startup-sequence).
  89.  
  90. where should it be used?
  91.  I had the following possibilities in mind:
  92.  
  93.   when you want to quickly print a text or document and so on without running
  94.  your word processor/text editor.
  95.  
  96.   when you want to send the escape codes to the printer not available in 
  97.  your program. remember that the program should not left the printer device
  98.  open,  because the PC won't be able to access the printer to open it.
  99.  
  100.  
  101.   PC was written on an A500 running OS1.3 with a Seikosha SP-2000 printer 
  102. compatible with  EPSON FX 850.It was compiled with the excellent Profimat
  103. assembler (though it has some bugs).I have not test it with any other printer
  104.  
  105.  
  106.  You can pay for the program in three ways:
  107.  
  108. 1) Send a small donnation.
  109.  
  110. 2) Send me computer books (especially Amiga books) ,Software or manuals you 
  111. don't need  any more, or even photocopies of articles in books or magazines
  112. containing Amiga programming guides or examples.
  113.  Here in Iran I have not much access to information on the Amiga so I would
  114. apreciate receiving technical information in any form. 
  115.  
  116. 3)Send me bug reports and mention the weak points of the program and the ways
  117. to improve it.My main reason of writing programs is to learn more.
  118.  
  119.  
  120.  Send any bugs you find or any suggestions or donnations to
  121.  
  122.                Kamran Karimi
  123.                2,Hassanabad
  124.                Haghshenas  str.
  125.                Navab       str.
  126.                13599 - Tehran
  127.                Iran
  128.